<%@ include file="/general/taglibs.jsp" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib uri="/WEB-INF/prjmanager.tld" prefix="prjman" %>
<stripes:layout-render name="/general/standard.jsp" title="Sincronizare model logic cu model fizic">
    <stripes:layout-component name="contents">

        <table style="vertical-align: top;">
        <tr>
        <td style="width: 25%; vertical-align: top;">
        <!-- Somewhat contrived example of using the errors tag 'action' attribute. -->

        <stripes:form action="/actions/synch/Synch.action" focus="name">

            <table id="EditTable">
                <tr>
                    <td><label>Sincronizare totala:
                    <stripes:checkbox name="synchronizeAllTableSet" id="all"/>
                    </label>
                    </td>
                </tr>
                <tr>
                    <td>
                        <label>Sincronizare custom:
                            <input type="checkbox" name="customChk" id="customChk" onchange="customChkk(this)"/>
                        </label>
                    </td>
                </tr>

                <tr id="custom">
                    <td>
                        <prjman:select name="tableIds" id="tableId" multiple="true"
                                       class="select_css"
                                       ddStyle="true">


                            <stripes:options-collection collection="${actionBean.tableList}"
                                                        label="tableName" value="id"/>
                        </prjman:select>

                    </td>
                </tr>
                <td colspan="2">
                    <stripes:submit name="sync" value="Sincronizare modele"/>
                </td>


            </table>
            <script type="text/javascript">
                function customChkk(param) {
                    if (param.checked) {
                        document.getElementById("custom").style.display = "block";
                        document.getElementById("all").checked = false;
                    } else {
                        document.getElementById("all").checked = true;
                    }
                }
            </script>

        </stripes:form>
    </stripes:layout-component>
</stripes:layout-render>

